﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CivilRegistry.ControlledModel;

namespace CivilRegistry
{
    public partial class RefreshContext : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            var entities = txtEntityNames.Text.Trim(' ').Split(',').ToList();

            foreach (var entity in entities)
            {
                Mediator.EntitiesToRefresh.Add(entity);
            }

            txtEntityNames.Text = "";
        }
    }
}